<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:jsp="http://java.sun.com/JSP/Page">

	<jsp:directive.page contentType="text/html;charset=UTF-8"
		pageEncoding="UTF-8" />
	<jsp:text>
		<![CDATA[
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	]]>
	</jsp:text>

	<f:view>
		<html>
		<head>
		<title>JarGle</title>

		<style type="text/css">
			.header {color: blue; font-style: italic}
			.footer {color: gray }
		</style>

		</head>
		<body>
		<h:form>
			<h:panelGrid columns="1" border="1" cellspacing="0">

				<h:panelGrid columns="1" border="1" cellspacing="0">
					<h:selectOneMenu valueChangeListener="#{pageBean.phaseChange}">
						<f:selectItem itemValue="image1.jpg" itemLabel="Waxing Crescent" />
						<f:selectItem itemValue="image2.jpg" itemLabel="First Quarter" />
						<f:selectItem itemValue="image3.jpg" itemLabel="Waxing Gibbous" />
						<f:selectItem itemValue="image4.jpg" itemLabel="Full" />
						<f:selectItem itemValue="image5.jpg" itemLabel="Waning Gibbous" />
						<f:selectItem itemValue="image7.jpg" itemLabel="Waning Crescent" />
					</h:selectOneMenu>
				</h:panelGrid>

				<h:panelGrid columns="1" border="1" cellspacing="0">
					<h:graphicImage alt="Lunar phase" url="#{pageBean.imageURL}"/>
				</h:panelGrid>

				<h:commandButton value="Show phase" />

			</h:panelGrid>
		</h:form>
		</body>
		</html>
	</f:view>
</jsp:root>
